package com.ruoyi.project.search.viewCargoStatistics.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.search.viewCargoStatistics.mapper.ViewCargoStatisticsMapper;
import com.ruoyi.project.search.viewCargoStatistics.domain.ViewCargoStatistics;
import com.ruoyi.project.search.viewCargoStatistics.service.IViewCargoStatisticsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 货位统计表Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-23
 */
@Service
public class ViewCargoStatisticsServiceImpl implements IViewCargoStatisticsService 
{
    @Autowired
    private ViewCargoStatisticsMapper viewCargoStatisticsMapper;

    /**
     * 查询货位统计表
     * 
     * @param warehouseId 货位统计表主键
     * @return 货位统计表
     */
    @Override
    public ViewCargoStatistics selectViewCargoStatisticsByWarehouseId(String warehouseId)
    {
        return viewCargoStatisticsMapper.selectViewCargoStatisticsByWarehouseId(warehouseId);
    }

    /**
     * 查询货位统计表列表
     * 
     * @param viewCargoStatistics 货位统计表
     * @return 货位统计表
     */
    @Override
    public List<ViewCargoStatistics> selectViewCargoStatisticsList(ViewCargoStatistics viewCargoStatistics)
    {
        return viewCargoStatisticsMapper.selectViewCargoStatisticsList(viewCargoStatistics);
    }

    /**
     * 新增货位统计表
     * 
     * @param viewCargoStatistics 货位统计表
     * @return 结果
     */
    @Override
    public int insertViewCargoStatistics(ViewCargoStatistics viewCargoStatistics)
    {
        return viewCargoStatisticsMapper.insertViewCargoStatistics(viewCargoStatistics);
    }

    /**
     * 修改货位统计表
     * 
     * @param viewCargoStatistics 货位统计表
     * @return 结果
     */
    @Override
    public int updateViewCargoStatistics(ViewCargoStatistics viewCargoStatistics)
    {
        return viewCargoStatisticsMapper.updateViewCargoStatistics(viewCargoStatistics);
    }

    /**
     * 批量删除货位统计表
     * 
     * @param warehouseIds 需要删除的货位统计表主键
     * @return 结果
     */
    @Override
    public int deleteViewCargoStatisticsByWarehouseIds(String warehouseIds)
    {
        return viewCargoStatisticsMapper.deleteViewCargoStatisticsByWarehouseIds(Convert.toStrArray(warehouseIds));
    }

    /**
     * 删除货位统计表信息
     * 
     * @param warehouseId 货位统计表主键
     * @return 结果
     */
    @Override
    public int deleteViewCargoStatisticsByWarehouseId(String warehouseId)
    {
        return viewCargoStatisticsMapper.deleteViewCargoStatisticsByWarehouseId(warehouseId);
    }
}
